// 用来对channel得数据进行本地得存、取、删
// 存
let channelData = 'hmtt80-channel'
export const saveChannel = (channelObj) => {
    localStorage.setItem(channelData, JSON.stringify(channelObj))
}
// 取
export const getChannel = () => {
    return JSON.parse(localStorage.getItem(channelData))
}
// 删
export const delChannel = () => {
    localStorage.removeItem(channelData)
}

// 封装关于搜索记录的存取
// 存
export const saveSearch = (searchObj) => {
    localStorage.setItem('hmtt-search', JSON.stringify(searchObj))
}
// 取
export const getSearch = (searchObj) => {
    return JSON.parse(localStorage.getItem('hmtt-search'))
}